<?xml version="1.0" encoding="utf-8"?>




<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">




<xsl:template match="/">
Humm and Strumm Log File
************************

<xsl:apply-templates select="log/header" />

Details of selected log entries:<xsl:apply-templates select="log/event" />
</xsl:template>





<xsl:template match="header">
Log File Information
====================

    Output level: <xsl:value-of select="level" />
    Run started at <xsl:value-of select="timestamp/@time" /> on <xsl:value-of select="timestamp/@date" />
    Operating System: <xsl:value-of select="system/platform" />
    System Processors:<xsl:for-each select="system/processor/processors">
      <xsl:value-of select="." /></xsl:for-each>
    Total RAM: <xsl:value-of select="system/memory" />
</xsl:template>




<xsl:template match="event">

Event #<xsl:apply-templates select="id" />
  On <xsl:apply-templates select="timestamp" />
  In <xsl:apply-templates select="file" />, line <xsl:apply-templates select="line" />: <xsl:apply-templates select="function" />
  "<xsl:apply-templates select="message" />"
</xsl:template>



<xsl:template match="id"><xsl:value-of select="." /></xsl:template>
<xsl:template match="timestamp"><xsl:value-of select="@date" /> at <xsl:value-of select="@time" /></xsl:template>
<xsl:template match="file"><xsl:value-of select="." /></xsl:template>
<xsl:template match="function"><xsl:value-of select="." /></xsl:template>
<xsl:template match="line"><xsl:value-of select="." /></xsl:template>
<xsl:template match="message"><xsl:value-of select="." /></xsl:template>


</xsl:stylesheet>
